package com.healthyeating.manage.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.healthyeating.common.annotation.Excel;
import com.healthyeating.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 进食记录对象 tb_eat
 * 
 * @author 段奇乐
 * @date 2024-12-18
 */
public class Eat extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 每日进食id，自增 */
    private Long eatId;

    /** 食物名称 */
    @Excel(name = "食物名称")
    private String eatName;

    /** 食物图片 */
    @Excel(name = "食物图片")
    private String imgUrl;

    /** 进食量 */
    @Excel(name = "进食量")
    private Double amount;

    /** 餐次 */
    @Excel(name = "餐次")
    private Integer timeInterval;

    /** 用户ID */
    @Excel(name = "用户id")
    private Long userId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setEatId(Long eatId)
    {
        this.eatId = eatId;
    }

    public Long getEatId() 
    {
        return eatId;
    }
    public void setEatName(String eatName) 
    {
        this.eatName = eatName;
    }

    public String getEatName() 
    {
        return eatName;
    }
    public void setImgUrl(String imgUrl) 
    {
        this.imgUrl = imgUrl;
    }

    public String getImgUrl() 
    {
        return imgUrl;
    }
    public void setAmount(Double amount) 
    {
        this.amount = amount;
    }

    public Double getAmount() 
    {
        return amount;
    }
    public void setTimeInterval(Integer timeInterval) 
    {
        this.timeInterval = timeInterval;
    }

    public Integer getTimeInterval() 
    {
        return timeInterval;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("eatId", getEatId())
            .append("eatName", getEatName())
            .append("imgUrl", getImgUrl())
            .append("amount", getAmount())
            .append("timeInterval", getTimeInterval())
            .append("createTime", getCreateTime())
            .append("userId", getUserId())
            .append("remark", getRemark())
            .toString();
    }

    // 额外的属性
    /** 当前天起始时间 */
    private Date startOfDay;

    /** 当前天结束时间 */
    private Date endOfDay;

    public Date getEndOfDay() {
        return endOfDay;
    }

    public void setEndOfDay(Date endOfDay) {
        this.endOfDay = endOfDay;
    }

    public Date getStartOfDay() {
        return startOfDay;
    }

    public void setStartOfDay(Date startOfDay) {
        this.startOfDay = startOfDay;
    }
}
